public class test08 {
    class Solution {
        public boolean canJump(int[] nums) {
            int maxRange = 0;
            for(int i = 0;i<nums.length;i++){
                if(maxRange>=i){
                    maxRange = Math.max(maxRange,i+nums[i]);
                }

            }
            if(maxRange<nums.length-1){
                return false;
            }else{
                return true;
            }
        }
    }
}
